﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace SystemWnioskujacy.Exceptions {
    public class MissingParameterException : SyntaxErrorException {
		public static string MESSAGE = "Syntax Error!";

		private MissingParameterException() : base(MESSAGE) {
		}

        /// <summary>
        /// Creates new exception.
        /// </summary>
        /// <param name="parameter">The name of the parameter that has been omitted.</param>
		public MissingParameterException(string parameter)
            : base(MessageGenerator(parameter)) {
		}

        /// <summary>
        /// Creates new exception.
        /// </summary>
        /// <param name="parameter">The name of the parameter that has been omitted.</param>
        /// <param name="inner">Inner exception</param>
		public MissingParameterException(string parameter, Exception inner)
            : base(MessageGenerator(parameter), inner) {
		}

        private static string MessageGenerator(string parameter) {
            return string.Format("Missing {0} Parameter Exception!");
        }
	}
}
